/**
 * 自动生成！请勿修改！
 */
import { command } from '../core/command';

class ELock {
    constructor(opt = {}) {
        const { device, to, ...opts } = opt;

        this.device = device || {};
        this.opts = opts || {};
        this._to = to;
    }

    get categoryCode() {
        return '010020031';
    }

    get categoryName() {
        return '\u7535\u5b50\u9501';
    }

    getAutoLockTime(params) {
        return command({
            method: 'getAutoLockTime',
            methodId: 'pDrhEcml',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getFingerprintsList(params) {
        return command({
            method: 'getFingerprintsList',
            methodId: 'pghzWY95',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getPassword(params) {
        return command({
            method: 'getPassword',
            methodId: 'p1vFBbrK',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getStatus(params) {
        return command({
            method: 'getStatus',
            methodId: 'pGox7x3M',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getUnlockRecord(params) {
        return command({
            method: 'getUnlockRecord',
            methodId: 'phEq1Dom',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setAutoLockTime(params) {
        return command({
            method: 'setAutoLockTime',
            methodId: 'pZgRtGDn',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setFingerprints(params) {
        return command({
            method: 'setFingerprints',
            methodId: 'pUPQO3e9',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setPassword(params) {
        return command({
            method: 'setPassword',
            methodId: 'ppAXiV7E',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setUnlock(params) {
        return command({
            method: 'setUnlock',
            methodId: 'peHyqSOI',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }
}

export default ELock;
